package com.tianxiabuyi.model.pojo;


import com.tianxiabuyi.model.base.TXBYObject;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 用户<br>
 * 1.普通用户的用户名等常规信息在user表中,档案信息在userprofile中,方便扩展亲子帐号
 * 2.科室版和院内版只用user表
 * @author yangh
 */
@Entity
@Table(name = "user")
public class User extends TXBYObject {
    @Column(name="user_name")
    private String userName;         // 用户名
    private String password;         // 密码
    @Transient
    private String repassword;       // 确认密码
    private String name;             // 姓名
    @Column(name="employee_id")
    private String employeeId;       // 员工id(科室和院内版中使用)
    private String title;            // 职称
    @Column(name="dept_id")
    private Integer deptId;          // 员工所属科室id(为本地数据库自动生成)
    @Column(name="nick_name")
    private String nickName;         // 昵称
    private String avatar;           // 用户头像
    private Long birthday;           // 生日
    private Integer gender;          // 性别
    private String phone;            // 手机号码
    private String mail;             // 邮箱
    private String question;         // 密保问题
    private String answer;           // 密保答案
    private String address;          // 地址
    private Integer city;            // 所在地，用城市区号
    private Integer client;          // 注册平台来源(iOS,安卓,微信)
    private Integer type;            // 用户类型(医生病人等)
    @Column(name="last_ip")
    private String lastIp;           // 最后登录ip
    @Column(name="last_login")
    private Long lastLogin;          // 最后登录时间

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRepassword() {
        return repassword;
    }

    public void setRepassword(String repassword) {
        this.repassword = repassword;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(String employeeId) {
        this.employeeId = employeeId;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public Long getBirthday() {
        return birthday;
    }

    public void setBirthday(Long birthday) {
        this.birthday = birthday;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getCity() {
        return city;
    }

    public void setCity(Integer city) {
        this.city = city;
    }

    public Integer getClient() {
        return client;
    }

    public void setClient(Integer client) {
        this.client = client;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public String getLastIp() {
        return lastIp;
    }

    public void setLastIp(String lastIp) {
        this.lastIp = lastIp;
    }

    public Long getLastLogin() {
        return lastLogin;
    }

    public void setLastLogin(Long lastLogin) {
        this.lastLogin = lastLogin;
    }
}